'use strict';

module.exports = app => {
  const { router, controller } = app;
  const jwt = app.middlewares.jwt(app.config.jwt);
  router.get('/api/v1/register', controller.users.register);
  router.get('/api/v1/login', controller.users.login);
  router.resources('users', '/api/v1/users', jwt, controller.users);
  router.resources('status', '/api/v1/status', jwt, controller.status);
  router.resources('messages', '/api/v1/messages', jwt, controller.messages);
};
